package com.three.crm.adapter;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.three.crm.R;
import com.three.crm.bean.CommonBean;

import java.util.List;

public class FeedbackListAdapter extends BaseQuickAdapter<CommonBean, BaseViewHolder> {

    public FeedbackListAdapter(@Nullable List<CommonBean> data) {
        super(R.layout.item_list_feedback,data);
    }

    public FeedbackListAdapter() {
        super(R.layout.item_list_feedback);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, CommonBean item) {
        helper.setText(R.id.tv_company,item.getGoods_name())
                .setText(R.id.tv_goods_name, "" + item.getCar_info())
                .setText(R.id.tv_goods_num, "" + item.getGoods_num() + item.getGoods_unit())
                .setText(R.id.tv_goods_quality, "" + item.getFeekback())
                .setText(R.id.tv_time, "" + item.getCtime())
                .addOnClickListener(R.id.tv_detail,R.id.tv_edit);
    }
}
